<?php
    $links_cat = get_term_by( 'slug', 'links', 'link_category' );
	$links_cat_id = $links_cat->term_id;
	$links_cat_name = $links_cat->name;
	
    $args = array(
		'category' => $links_cat_id,
		'orderby' => 'rating',
		'limit' => 4,
	);
    $links = get_bookmarks($args);
	if ( count($links) > 0 ) :
?>
<div id="links-box">
<h1 class="box-title links-title title"><?php echo $links_cat_name; ?></h1>
<ul class="box-list yui-cssbase">
<?php 
	foreach ( $links as $link ) {
		$url = $link->link_url;
		$title = $link->link_name;
		echo "<li class='box-list-item'><a href='$url'>$title</a></li>\n";
	}
?>
</ul>
</div>
<?php endif; ?>